from django.contrib import admin

from django.contrib.auth.admin import UserAdmin as AuthUserAdmin
from .models import Profile, User


@admin.register(User)
class UserAdmin(AuthUserAdmin):
    """重写默认UserAdmin添加email输入框"""
    add_fieldsets = (
        (None, {
            'classes': ('wide',),
            'fields': ('username', 'email', 'password1', 'password2'),
        }),
    )


@admin.register(Profile)
class ProfileAdmin(admin.ModelAdmin):
    pass
